<template>
    <div>
        <span v-if="isVisible">条件指令</span><button @click="qh()">事件切换</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            isVisible:true
        }
    },
    methods: {
        qh(){
            this.isVisible=!this.isVisible;
        }
    },
}
</script>

<style scoped>

</style>